fixed small typos and hopefully correct fida weight function factor