final version of thesis.coffee