added handler logic