contains method as pure virtual added and solved a typo