Refactorerd update aval. res.