struct method, modify attr