add scale factor and better documentation