limit and sleep as parameters