First (not good) solution of exercise