Implemented Safe and Relivent search