Hmm, not quite sure why I have `int cur` as an argument... doesn't seem to be used.