remote session related code