lab4 code finished