copying nirto code to rodolfo code