Do that in a more logical way