Changed val format
Refactored cmp tests for generalization