added regular expressions to check format of parameters and a priority determination function: limited infection being implemented