check if definied before defining