use structure with names to remove extra lines of code