removed some redundant whitespaces and some indentation mistakes