Actually figured out why my original solution was failing