Add limit parameter to function declaration 

Forgot to do this in previous commit.