lab3 main code added