finished the dualpal problem