new macros which can reduce necessary casting