performance

we don't need to call this function twice if we store the result