added init to fitting