updated search functions and new membership function