updated for api changes