oh lord, who will rewrite this stuff, once ..