populate the pre tag automatically