Working insert item code