store hashcode to prevent repeated calculations