fitting a double learning curve