refactored syncChart into separate file