session tracking function added