These are basically the same. Try to remove as much extraneous repetition as possible (say by dispatching to common underlying functions).