applied most change requests (missing err handling in Scan)