add nscoding snippet, for NSCoding protocol methods