Refactoring

Shorter solution, similar way