ensure scalefator is calculated only once