First working version - PA 1