misc
refactored code
refactored code