Added macro for fetching values from list of classes