Adapted the function to new listing and property macros