Working Code

First working version