improved several index macros