added sync and refactored components