splitting source code
refactored