created assignment 2 code