revise indentation and constructor of KNN