Some refactoring
some tries to refactor