passing tests. Still unclean, fishy, and non-dry
added some comments