hw2 crazy code done