made hacks more general