Your solution looks more efficient and more readable/understandable so let's keep it.