code reformatted: using spaces instead of tabs