Avoid populating temporary array