re-modified last version, minor error