moving everything into env-matrix