refactor (thanks @imsickofmaps)