convert session-ctx to be a class