implemented the stuff as I discussed on dwm@