refactored theater reservation code