add some context dependent functions to the API