complete parsing, add translation function