added changes for new API