add session functionality