sorting targets and firing at enemies