compute usage only once