Refactored in next comment