updated for the new API