added a test to spatial average