extracted more sql statements