updated deprecated unserialize() method