better session implement (I think)