stage 1 finished

can't run due to foreign compilation errors, thus untested.