heartbeating, lib for common functions