removed session closing code