made EC work except for inheritance