added base function for retrieving custom groups and custom fields