a tiny refactoriing