no memory leaks and everything works for 236 lab2