fairly simple after finally figuring out where I went wrong in part A. Note - Struct included in solution inspired by online solution