shorten code a bit