update main handler