added val methods, tests.