added conditions for error message in booking