Change adding and updating activity into DB accordingly