Changed to the new API, as in #56