initial version for scan, open, close