added new schema extraction code