Working version untill the 2nd step.