finish overlap time algorithm