debugging in auxfunctions