updated search with variable