use macros from common/utils, add casting to macros to allow using variables