changes made to shorten code