big progresses towards refactoring