adjust to new API