added code to pass custom attributes to the scanner