a cooler way to do this