my code works. it's 6-100 times more performant. i still don't know why