added a 'reasonable' ai and some other tweaks