Agreed. @dmitchell, is there a better way to implement this?