big refactoring agian and again ... ... ...