Added pseudocode for what I'm trying to implement, but there's still a couple chunks I'm not sure how to do.