variables now moved to main handler