implemented basic AI testing
made run method more amiable to testing