Correctly putting things in a dictionary