fix call stack size exceeded error, i think
attempted fix for call stack size exceeded error, still crashes though