added DocStrings
added tests for all functions