added a merge data frame function