added tests for some function