use dictionary based on id