//Heart beat handler