removed some spaces before \n and fixed encoding