code taken from tryFsharp.com