slightly less hacky