update repository method