more changes to Main.as