Reworked problem 1 and add spec