added main functions, added more scoring analysis