added ews calculation to seperate file