about to refactor encryption session