modify for using context instance