fixes bug in if elsif in animal's statement.