minor fixes... now compiles. Should run