part 1 done except freeing
finalized part 1