refactored priority to enum