#5 added chaining instruction steps
#5 fixed heartbeat bug