adding heartbeats and testing locks