slight miodification to met_functions module, added unit test to test_met_functions