version 1, assignment 7.1

move if/else statements on assignment 3.1 to one line.
assignment 6.1 and 7.1 are still pending
this is a very nice use of creating a utility function then using it. but checkout http://lodash.com/docs#uniq