fixe refactor problems