A little code de-duplication