Better way to do defined_in statements