a better solution to the hacked up test