switched to use the Shell Parameter Expansion logic