Could this potentially be inefficient or am I not understanding the intention of the code? Either way, it seems good but I'd like to know if this may be related if I ever run into issue regarding performance.