replaced constant num to enum