main is running, solved some errors