Adding support for multiple species and writing out to file