He was sentenced to up to 21 years in prison.