implemented the booking functionality