better rand (not tested))