add base logic for lab2