check in assignment 2 code