added some interfaces
changed the predictor class to a generics class.