Assignment 4.1.1

not my proudest coding moment, nonetheless, it works!  and i know exactly what's going on.  and yes all original work, no coping whatsoever....although maybe i should.  it took a ton a time doing it this way.  time to sleep now.
what about using `filter` here?