fixed errors. now compiles