added driver code, added merge code, added print helper