added code and explanation to creating the tidy dataset