updated the final output