recursive simulation