adapting to the new table schema