added simulation functions