lab2: basic version