Generalized the code to cover more species
added rr.java