adapting to new apis