Do this in a saner way