using gem group instead of regex