optimize the interface for class