First working version with view