added contains method for browsers that don't have it.