finish check and lock functionality