memoised a few values to improve performances