removed debug mode + test code