edited fit routine