adjust API for robustness