Refactoring
Bug revise