modify to remove depencency on ANAPHORA library