using valueOf instead of constructor