adding clarifying comments, checking for Nones
everything passing tests
small mistake