priority must be an integer, added public priority update method and tests