changed to activities and improved main class