Final version, commnted and ready to evaluate