Implemented outline of code for new sync algorithm