update code for NSCoder