needed to create a new database (with new name) to get sync function working, also remove debug code