improvements to average x computation added and normalisation in computefps fixed