some changes
refactred