Added thread sleep for aI