format stages in a table