added preferences classes and trying to implement the threshold value method