Second implementation (based off kathleen's outline)