use reflect, and add session design