break up handler logic