assignment 2 code basic framework