Making the changes that @fentie suggested for this piece