should we keep local reference to element[0] instead of uwrapping it 4 times in this code?