write scopes and orders