updated to new version with session tracking