refactor, data to object