add proper inout pointer support