adding macros for edit fields