added enum switching (build has output errors)