Started adding sync code