code refactor, resetDataObj()