Modification in driver.cpp and test it. I think the attribute aprt is working.
Modifications in driver.cpp, I think it is working properly now. You can also following my comments to add more features.