test with random numbers implemented, some bugs left to fix