major code refactoring. Also make sure we return a prediction item