fixed compile errors from previous commit. now ready for integrated testing of stage 1