commented on thought process for writing code to meet the requirements of this assignment