bug fix
refactoring