that answer looks convoluted, is there an easier script?