improved ai behaviour