using customized handlers instead of eventhandlers