add runtime check