Made sync instead of async and added better formatting to output.