Wrote helper method to practice decompostiion