wrote unit tests for a handful of functions