more lab 6 functionality