commiting premutation code