Adding basic simulation function.