First try to handle EHR I changed some things