added substring function
concatenate function creates new array