there's got to be a better way to do this :P