added macros, varargs
parts of a working lib