factored helper functions out of Freshman.pm