Enhanced insertion mechanism, now will insert at the right place