improved session data retrieval