shorten up some logic