added explaining comment
possible implementation of quickfit, not tested
copied methods from quickfit.c
cleanup