SALEM, Va. (AP) — A Virginia appeals court has rejected the appeal of a man convicted of using a computer to solicit a minor and taking indecent liberties.

The court this week ruled against Major Lance Hillman of Lynchburg, who is serving a six-year sentence.

Authorities say a 14-year-old girl who attended a church where Hillman was a volunteer youth pastor sought him out for counseling in 2015 because of prior sexual abuse. The two later exchanged nude images of themselves.

Hillman argued that the judge erred in finding that the evidence proved that he knew or should have known that the girl was under 15, and that he had exposed himself to her.

The appeals court rejected the idea that exposure requires a person to be in the physical presence of someone else.