adding error handlging for non-int priority