tidying up list insertion