rewriting limits, work in progres (broken) [ci skip]