improve example, add session