refined the output