Found a section of code that could be condensed