updated for sessions