fixed deprecation warning

from_str() is now deprecated and replaced by parse()