add  function of session.