added zero detector in ID stage