Advanced assignment 1 fix'd