tiny bit of refactorisation