compiling and running both main classes. Can use 'gen-idea'