fix input name, add residue count