issue #49 - moving both classes to the same file to prevent cycles