Reimplementation, addressing #2