Adding support for scan command