refactoring
bug fix