reworked gc base machine, added tests