figured out the ioloop timeout, implemented the heartbeat