working on a macro for unit types