avoid dereferencing pointer more than once