update to new APIs