fixed a minor problem with search in model, add search to view