restructoriced some stuff