added tests for average()