added frandom support (credit: Ryuinferno)