added check before define()