Add code from lab 3