This is a challenge to make functional code out of bad code.