Nice Update - refactored code