add session and refactored