added new helper functions. Bugfixes in oneStep. TODO: rotate quadratic function