added comments to make use of fit function more clear