started a rewrite of history functions, this time with an OO approach