Added second optinal parameter for passing separator