better way to iterate a range and skip k. no need to write the "ret *="-line twice
tweak the main loop a little