added some more unit tests for refactored prototype functions