Debuging new code refactor