fixed errors, now compiles