random algo module working