add 2 functions and some macros
commit again