writing code for formatting extended taxonomy