update to use DB where query