first (and hopefully final) draft of assignment 2