extracted translator code from original "drafts" project