complete logic for reservation controller