removed redundant code
fixed tabs and indentation