fixed some errors, the program now compiles successfully