added unit testing for new functions