update and structured code