added scoring and debug flag