factor common behaviour out into base class