finished freeze function, now writing unit tests