version refactorization; fixed session read