used deepseq to write a function to fully evaluate arrays, which seems to be helping with the stack space problems