Ex04: Made all corrections to hw04