main handler module