refine handler class logic