converted RemoteEntityType to scala