added code for activity