refactor the mem poller