shortened the containsO and containsX anonymous method to use a shorter lambda expression