scanning functionality added