trying to implement heartbeating