updated to new API