John - basic implementation of sync (need better error handling)