adjusted code for use with latest core and coref updates