changed main activity structure