refactored to work with drachtio-session