clean up some if syntax