added scoring functionality