fixed bug in lab4