solution for lab 2