Added test code to extract and process attributes