Added data_from_str utility method