added ai and scoring