last version. many things were changed