Finished hw1 and fixed all bugs