refactored SyncArray to be easier readable