add code for using session tracking mechanism & keeping earlier changes