make this less hacky