bug fixed & more tests