Added function to test membership