added if-statement for setting enum