fixed extra code and indentations