last version with some errors