lab1 functionality seems ok