added a really basic random input generator, fixed some issues