Second working version

Working version with comments