changed session to singleton