refactor data structures to parse objects