impemented booking query