shorten names and remove inefficient code