cleaned up the handler