posts added
refactored code