Add generic With-function