added reference to activity and intent