replaces magic numbers with constants, wip - envelope-control