This version works! Though it's not efficient.