test solution by Jian Zhang