aux refactoring, better debug