organize programming mode hooks