Revert "simplified internals for readability"

accidentally committed an unrelated change

This reverts commit a6db9842e539de7732315878e7def50deca4360e.
simplified internals for readability