small functions to enable capture