string concatenation using pointers
removed redundant code