insert at beginnig function implemented