My solution for IJC project #1