Removing manual strcpy loop and using strcpy instead