add encoder to heartbeat module