rewrite infect/plague into script based on new library