added score functunality