change queries to the new schema