updated calculator to fix priority field