Initial attempt showing the working code