added debug mode n automatic chiper selector