using record syntax in these types might make it easier to read the implementation and make some of the implementation more trivial