added SaveActivity code