code_TP4 - done again