added precondition check in helpInsert