improved mutation routine