optimize double emitting