Separated method for inserting into X element