new code structure for new sessions