change the switch to enum

when get the status and level