added code from EE