how to use dictionary methods