fully extracting all the bookkeeper logic into smaller components