begin write substitution and beta-eq