added random delay between 0 and 3 seconds before switching