Completed the foreach exercise