Running your function would help you find the error.