wip
db and sync bugs are fixed!