Add attempt as a parameter to the function.

Make sure to type attempt.