more changes...
seg fault happening from line 169.