global refactoring started

NOT WORKED COPY