setError now allows object
added todo
removed console.log