i have attached the solution of the hw and i just need to rewrite it again in ot