first go at sync functionality