new library file for common functions