parameterize and significant cleanup ;
remove dependency on concat module