flattened group min method to convert to hash, heroku debugging