Added the spec and implementation of the contains method