Changed 'from' calculation to directly use properties