updated sample01-22 with new select source logic