Optimizing adapter class