completed initial coding for lab 2