rework of debug release switch
updated