edited the add activity functionality