added updateDetail function