contains algorithm