updated for upstream changes