remade defs for modularity