code refactor
bug fix