First lab1 first implementation