added validations and use of constant for priority