complete rewrite

after whole year of thinking :-)