replace db with models