refactoring v.1
refactoring v2
refactoring v3