write function for checking box when input PCAclick