moved debug outputs and added getModeString