updated API for correctness