make append function could use array as parameters