Fixed to use dictionary