shorten code up a bit