added some stuff
now uses object. Also added distance to allies and stuff