Added sync option (to reset database