reverting to edi's original code