wouldn't be better to check if ``name.endsWith('$')``?