Added code for scanning container