Write proc and some comments