lab3 w/o sbuf handling