completed 17 with tests, but don't handle NULL well