set context to self for zig functions