added upstreamed function