Totally cheated and looked at Jeff's solution