make the hacked code slightly less bad