finish check func