speeding up the check canclose