updated for new API