added tests for common functions