Working version

First working version