Removed duplicate problem in search method