next blog
formatted code, refactored