assignment 2, implementations