Final version, marco's changes