added 'contains' code and tests