added main() implementation but randomness and seeds is issue, needs more investigation