remove case classes in api