Refactored per the article