changed let back to var, fixes #1