small functions used in c#, e.g. save list to file