Almost done. Need to fix while and !=