done with alloc and free in lab6