models: use context() function in model