new tests added, bug fixed