fix #1 better session api