Changed create session method