what's the function of ligase in DNA replication