got matlab working, finished part 3