refactoring
tests for valueOf added