Hopefully final version of 637 assignment 2