added OO-style F# impl