Revised smx generation