small corrections in model and tests added