almost got pre booked functionallty working