Created Compare and Append functions.