db session as class