logic is finished to pin