implemented math envs