trim the context