add partial implementation of session