remove some database selects