working on a fitting algorithm