created not so stupid random(NSR) algo