modified model sql selects to account for soft deletes