             let job = JobOpportunity()
             job.address = address
             job.spaceType =
-            job.numberBedrooms = bed
+            job.numberBedrooms = Int(bed)
             job.numberWashrooms = washroom
             job.price = price
             job.jobWorkDate = d
-            job.hoursToWork = hours
+            job.hoursToWork = (hours)
             job.zipcode = zip
 
             Facade.shared.registerJobOpportunity(user: currentUser, job: job, onSuccess: onAddNewPostSuccess, onFail: onAddNewPostFail)

    let noOfTypes: [String] = ["House", "Condo"]
    let defaultBedAndWashrooms: [Int] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

    var bedroomPrice = 7
    var washroomPrice = 5

    var space = ""
    var bed: Int = 0


    @IBAction func createNewPost(_ sender: UIButton) {

        if bed == 0 {
            bedroomPrice = 7.0
        } else {
            bedroomPrice *= Double(bed)
        }

        if washroom == 0 {
            washroomPrice = 5.0
        } else {
            washroomPrice *= Double(washroom)
        }

        let d = Date()
