correct logic for predictions