refactored metalvalues and added tests