renamed and separated some stuff