added some session checks, using expression session methods. Not tested yet