                 bookingRowButtons.append(button)
                 cardView.addSubview(button)
                 button.widthAnchor.constraint(equalToConstant: buttonSize).isActive = true
+                button.heightAnchor.constraint(equalToConstant: buttonSize).isActive = true
                 button.topAnchor.constraint(equalTo: bookingRowViews[row].topAnchor, constant: 2).isActive = true
+                button.centerXAnchor.constraint(equalTo: bookingButtonTimeLabels[row][n].centerXAnchor).isActive = true
             }
-            
             bookingButtons.append(bookingRowButtons)
         }
-        
-        
-        /*
-         bookingButtons = (getBookingButton(), getBookingButton(), getBookingButton())
-         addSubview(bookingButtons.0!)
-         addSubview(bookingButtons.1!)
-         addSubview(bookingButtons.2!)
-         
-         bookingButtons.0!.widthAnchor.constraint(equalToConstant: buttonSize).isActive = true
-         bookingButtons.0!.heightAnchor.constraint(equalToConstant: buttonSize).isActive = true
-         bookingButtons.1!.widthAnchor.constraint(equalToConstant: buttonSize).isActive = true
-         bookingButtons.1!.heightAnchor.constraint(equalToConstant: buttonSize).isActive = true
-         bookingButtons.2!.widthAnchor.constraint(equalToConstant: buttonSize).isActive = true
-         bookingButtons.2!.heightAnchor.constraint(equalToConstant: buttonSize).isActive = true
-         
-         bookingButtons.0!.topAnchor.constraint(equalTo: topAnchor, constant: 2).isActive = true
-         bookingButtons.1!.topAnchor.constraint(equalTo: topAnchor, constant: 2).isActive = true
-         bookingButtons.2!.topAnchor.constraint(equalTo: topAnchor, constant: 2).isActive = true
-         
-         bookingButtons.0!.centerXAnchor.constraint(equalTo: bookingLabels.0!.centerXAnchor).isActive = true
-         bookingButtons.1!.centerXAnchor.constraint(equalTo: bookingLabels.1!.centerXAnchor).isActive = true
-         bookingButtons.2!.centerXAnchor.constraint(equalTo: bookingLabels.2!.centerXAnchor).isActive = true
-        */
     }
     
     fileprivate func prepareBookingRowLabels() {

            } else {
                bookingRowView.topAnchor.constraint(equalTo: bookingRowViews[row - 1].bottomAnchor).isActive = true
            }
        }
    }
    

        bookingButtonTimeLabels = [[UILabel]]()
        for row in 0..<HomeStudyRoomCell.numberOfBookingCellRows {
            var timeLabels = [UILabel]()
            for _ in 0..<3 {
                let timeLabel = getBookingTimeLabel()
                cardView.addSubview(timeLabel)
