edit the functionality for adding of activities