Final version

commented and ready to submit