Fixed a bug & wrote more TC's