refactored search code to include short form searches