downcast before searching