insertAtNthPosition method added