initSession and getException added