keep_alive() function added