Added random generation and runtime mesurement