Updated format_source