Grade school exercise | 2nd iteration