bug corrected: order of params, and new tests