why is fit() called in here