code almost finished2