factor out style