updated version for lab2