introduced exceptions in session module