Add code for exercise B, storing and retrieving data