reorganization of case classes