Add code for ex12
Try to add quick check, but not make it work yet.