A former high school teacher in Virginia pleaded guilty to accessing a protected computer and aggravated identity theft in the Celebgate hacking scheme.

Christopher Brannan, 31, who once taught at Lee-Davis High School, accessed the iCloud, Yahoo!, Facebook and other email and internet accounts of more than 200 celebrities and non-celebrities by answering security questions he gleaned from the victims’  Facebook accounts, the Justice Department said.

He also used phishing emails to get into victims’ accounts, creating emails that appeared to be from Apple to garner login credentials, which he then used to access email accounts and obtain private photos and other content. The Justice Department said Brannan used ElcomSoft and other software to download whole iCloud accounts.

The charge against him carries a maximum of seven years, although the parties involved have recommended that he receive 34 months. Brannan is set to be sentenced on Jan. 25.