make heartbeat an option thart can be passed to client and server