working on ai

currently does nothing, but is almost fixed?