raised default wait time to 2 seconds, added it as a parameter