Addedd functionality to activity