core library of common functions and macros