done with c part of lab1