tabs -> spaces in an ugly bit of the code