started adding the preprocess function; handle na in score function