passing the wrong context will cause a core dump. we should add a note to each function specifying which context it expects