Slightly less hacky