improved performance using less stack data