heartbeating, library for common functions