Got proper output but ugly formating