create reusable function for getting price group object