refactor enabled check