refactored stringlist in c