convert syntax to use expect and let where possible.