avoid creating new arrays every time