I wrote this a long time ago. Still, I hope it will serve purpose of learning.

Download PDF (1 MB)