implement simple unserialize