added Average method