functioning for new API