refactor data