removed unnecessary braces
updated serialize_species