converted to F# with LOTS of nice options