removed deprecated sql statement