The gunman charged with killing at least seven people at a July 4 parade in Highland Park, Illinois, made his first court appearance on Wednesday and confessed to the shootings, authorities say.

More than 30 were injured in the attack.

Suspect Robert Crimo III, 21, appeared from jail via a video link to face seven first-degree murder charges. He was denied bail. He reportedly showed no emotion and spoke only briefly.

Authorities say Crimo allegedly planned the shooting for weeks.

Crimo was able to climb a ladder along the parade route in order to shoot down on the crowd. Dressed in women’s clothing, he allegedly fired more than 70 rounds, apparently at random.

He was able to flee the scene before finally being arrested after several hours on the run.

Officials said Crimo drove his mother’s car to Madison, Wisconsin, where he contemplated another shooting. He then returned to Illinois.

If Crimo is convicted of all seven murder counts, he would be jailed for the rest of his life without the possibility of parole, Eric Reinhart, the state’s attorney for Lake County, said in announcing the charges on Tuesday.

“These are just the first of many charges that will be filed against Mr. Crimo,” the prosecutor told reporters. “We anticipate dozens of more charges centered around each of the victims.”

Investigators who have questioned the suspect and reviewed his social media posts have not determined a motive for the attack, Lake County Major Crime Task Force spokesman Christopher Covelli told a news conference. Crimo legally bought the weapon found at the scene of the attack and a second rifle found in his car, Covelli said.

Police said they have not found any indication the suspect targeted anyone by race, religion or other protected status.

Crimo, who goes by the name Bobby, is an aspiring rapper with the stage name Awake the Rapper. He posted videos and songs, some ominous and violent, on social media sites.

Crimo had two brushes with law enforcement in recent years, once for an attempted suicide and another for allegedly making threats to kill others.

During the second incident, police seized 16 knives from Crimo, but no arrest was made, as authorities at the time lacked probable cause to take him into custody, Covelli said.

The Highland Park attack was the latest mass shooting in the United States in recent weeks, with earlier assaults on people occurring at a grocery store in Buffalo, New York; an elementary school in Uvalde, Texas; and a medical office in Tulsa, Oklahoma.

Some information in this report comes from Reuters.