use models instead of  plain sql + new urls