modify API for scanning