PASSING ALL TEST again - complete rewrite concluded