mostly completed, some compiler issues need to be resolved