Used helper method to practice decomposition