format code;add action links