fixed insert and contains method