removed getNameArray method (replaced by template for loops)