fix & refactoring