updating for new API