experiment with changing intial stack size
go back to using append instead of manually copying
fix Apply function per recommendation by chrhlnd