added functions to provide more hints. use a new scheme of tie breaking for majority vote in KNN