Adds limit function.