A little less hacky than before