finally works fully! used nskeyedarchiver