changed some code in activity class