Much more neat solution